/*
package cn.wolfcode.productserver.controller;

import cn.wolfcode.productapi.domain.Product;
import cn.wolfcode.productserver.service.IProductService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ProductController {
    @Autowired
    private IProductService productService;

    @Value("${server.port}")
    private String port;

    @RequestMapping("/get")
    public Product get(Long id){
        Product product = productService.get(id);
        Product result = new Product();
        BeanUtils.copyProperties(product, result);
        result.setName(product.getName() + ": " + port);
        return result;
    }
}
*/
